home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-19 / a7221v1b.zip / SEND7221.DOC < prev    next >
Text File  |  1992-03-17  |  19KB  |  469 lines

  1.  
  2.                                 SEND7221
  3.                               Version 1.0b
  4.                          University of Rochester
  5.                           Psychology Department
  6.                               March, 1992
  7.  
  8. Sections in this document:
  9.  
  10.    DISCLAIMER
  11.    TRADEMARKS
  12.    INTRODUCTION
  13.    AUTHENTICITY
  14.    COPYING
  15.    COMPILING
  16.    SYSTEM REQUIREMENTS
  17.    USAGE
  18.    ERROR AND WARNING MESSAGES
  19.    PLOTTER ERROR LIGHTS
  20.    BUGS
  21.  
  22. ----------------------------------DISCLAIMER---------------------------------
  23.  
  24.    This software is distributed free of charge.  As such, it comes with 
  25.    ABSOLUTELY NO WARRANTY.  The user of the software assumes ALL RISKS 
  26.    associated with its use.
  27.  
  28.    Please read the COPYING section of this document to determine your rights
  29.    to copy and/or modify this software.
  30.  
  31. ---------------------------------INTRODUCTION--------------------------------
  32.  
  33.    The SEND7221 program is a companion to the ADI7221 program, and is used
  34.    to send the output from ADI7221 through a serial connection to an HP
  35.    7221 plotter.  The SEND7221 program handles buffer control and other
  36.    minor device control instructions.
  37.  
  38.    SEND7221 has several command line options, all of which control the way
  39.    the serial port is configured.  These options are discussed in the USAGE
  40.    section of this document.
  41.  
  42.    This program may be useful for sending 7221 code produced by other
  43.    programs, but may not operate correctly if the code contains anything
  44.    other than graphics instructions.  In particular, code that includes
  45.    plotter on or plotter off instructions, or changes the handshake mode
  46.    will probably not work.
  47.  
  48. ----------------------------------TRADEMARKS---------------------------------
  49.  
  50.    IBM is a registered trademark of International Business Machines.
  51.  
  52.    AutoCAD and ADI are registered trademarks of Autodesk, Inc.
  53.  
  54.    Hewlett-Packard and HP are registered trademarks of Hewlett-Packard Corp.
  55.  
  56.    Microsoft and MS-DOS are registered trademarks of Microsoft Corporation.
  57.  
  58. ---------------------------------AUTHENTICITY--------------------------------
  59.    To ensure that your copy of SEND7221 is virus free, it is recommened that          
  60.    you obtain a copy of the VALIDATE program.  This program is free, and is
  61.    part of the McAffee Associates virus protection package (the rest of the
  62.    package is shareware).  McAffee associates can be contacted at
  63.    (408) 988-3832.
  64.  
  65.    The Size reported for SEND7221.EXE and the Hex numbers associated with
  66.    "Check Method 1" and "Check Method 2" should match the output from the
  67.    following run of VALIDATE version 0.3:
  68.           
  69.               File Name:  SEND7221.EXE
  70.                    Size:  12,581
  71.                    Date:  3-16-1992
  72.     File Authentication:
  73.          Check Method 1 - DD80
  74.          Check Method 2 - 001F
  75.  
  76.  
  77. -----------------------------------COPYING-----------------------------------
  78.  
  79.    You may copy and redistribute this software and its source code in its
  80.    unaltered state, provided that each copy is labeled with the original 
  81.    copyright and disclaimer of warranty notices.  Recipients of distributed
  82.    copies of this software must also be given the rights outlined here.  No
  83.    fee may be charged for copies beyond nominal copying and media costs.
  84.    
  85.    You may modify your copy of the source code, and may distribute the
  86.    modified versions under the following conditions:  
  87.  
  88.       All modified files must be clearly labeled as modified versions, such
  89.       labels must include the authors name, the date, and the nature of all
  90.       changes.
  91.  
  92.       Any program that contains the source code from this software, in whole
  93.       or in part, must be licensed free of charge, under the same conditions
  94.       as those outlined in this document.  The one exception being that you
  95.       can provide a warranty for your program if you choose.
  96.  
  97.       A reasonable attempt must be made to notify the orignal author of this 
  98.       software prior to distribution of modified versions.  Such notification
  99.       should include the nature of all changes made to the software.
  100.       
  101.    The original author can be contacted at the following address:
  102.  
  103.         Dave Lutz
  104.         Psychology/Meliora Hall
  105.         Univeristy of Rochester
  106.         Rochester, NY 14627
  107.  
  108.    Electronic mail may be sent to one of the following addresses:
  109.  
  110.         Internet: lutz@psych.rochester.edu
  111.                 or
  112.                   lutz@prodigal.psych.rochester.edu
  113.         BITNET:   lutz@uordbv
  114.  
  115.    Bug reports can also be sent to any of the addresses listed above.
  116.  
  117. ----------------------------------COMPILING----------------------------------
  118.  
  119.   The source code for SEND7221.EXE has been included so that you may
  120.   compile it yourself if you wish.  The code is written in C, and was tested
  121.   using Microsoft C 5.1.  A Makefile for that compiler has been included in
  122.   the distribution.  If you do not have MSC 5.1, you may have to create your
  123.   own Makefile.
  124.  
  125.   The source for SEND7221.EXE contains code that may be compiler dependant,
  126.   and is definitely CPU dependant. (sorry folks, serial I/O on a PC is a
  127.   royal pain)  I have tried to isolate the compiler/CPU specific code within
  128.   one module (COMIO.C).  This module will probably have to be modified if
  129.   you use anything other than Microsoft C 5.1 on an IBM compatible PC.
  130.  
  131.   The following discussion assumes that the files in the distribution were
  132.   installed as follows:
  133.  
  134.         /ADI          - .DOC files and precompiled .EXE files
  135.         /ADI/ADI7221  - source for ADI7221.EXE
  136.         /ADI/SEND7221 - source for SEND7221.EXE
  137.  
  138.   It is critical that you DO NOT COMBINE the source code for ADI7221 and
  139.   SEND7221 in the same directory.  The two programs have modules/files by
  140.   the same names that have different contents.
  141.  
  142.   Before you begin compilation, CD to /ADI/SEND7221.  Next, look at the
  143.   definitions in MAKEFILE.MSC and modify them for your local site.
  144.  
  145.   Assuming you have MSC 5.1, you should type "make makefile.msc".  The code
  146.   should compile with no errors, except that you will get the normal "Warning
  147.   target does not exist" message for each module as it is compiled.
  148.  
  149.   As it is currently defined, the makefile will first produce an executable
  150.   called SEND7221.EXE in the SEND7221 directory.  This executable is then
  151.   packed via Microsoft's EXEPACK command, producing the final SEND7221.EXE
  152.   in /ADI.
  153.  
  154.   Once the final exeutable is in place, you can delete all of the .OBJ files
  155.   and the intermediate SEND7221.EXE file from /ADI/SEND7221.
  156.  
  157. -----------------------------SYSTEM REQUIREMENTS-----------------------------
  158.  
  159.   SEND7221 should run correctly on any IBM compatible PC that has at least
  160.   50k of free memory, a serial port, and (of course) and HP 7221 plotter.
  161.  
  162.   The plotter should be connected to the computer via a NULL modem cable.
  163.   The default settings for SEND7221 assume that the plotter is connected to
  164.   COM1, and has been set for 2400 baud, parity enabled, even parity.
  165.  
  166.   There is no limit to the size of the input file, and the memory
  167.   requirements of the program do not change with the its size.
  168.  
  169. ------------------------------------USAGE------------------------------------
  170.  
  171.    The command line for the SEND7221 program can be quite simple, and
  172.    consists of the following when default settings are used:
  173.  
  174.         SEND7221 infile.hpp
  175.  
  176.    The file infile.hpp is a file containing HP 7221 plotter codes which were
  177.    produced by the ADI7221 program.  The codes are assumed to contain graphic
  178.    instructions that the plotter will use to plot a drawing.
  179.  
  180.    The above command assumes that the plotter is connected to COM1, at
  181.    2400 baud, parity enabled, even parity.
  182.  
  183.    There are several command line options which can be used to set various 
  184.    parameters for serial port configuration.  The complete synopsis for the
  185.    command is as follows:
  186.    
  187.    SEND7221 [/C:?] [/D:?] [/S:?] [/P:?] [/B:????] infile.hpp
  188.  
  189.       /C:? = Com port number (1-4)        Default=1
  190.  
  191.          Use /C if you have the plotter connected to a serial port other
  192.          than COM1 (ie COM2 = /C:2).
  193.  
  194.       /D:? = Number of data bits (7/8/D)  Default=7
  195.  
  196.          Use /D to specify the number of data bits.  This is only necessary
  197.          if you disable parity checking on the plotter.  In that case, you
  198.          can use /D:8.
  199.  
  200.       /S:? = Number of stop bits (1/2)    Default=1
  201.  
  202.          Specify the number of stop bits.  There is no need for this option
  203.          unless the program is modified to support baud rates of 75 or 110
  204.          baud. If that is the case, and you choose to use 75 or 110 baud,
  205.          you should also use /S:2.
  206.  
  207.       /P:? = Parity (E/O/N/D)             Default=E
  208.  
  209.          Set parity to even, odd, none, or don't care.  If you disable parity
  210.          checking on the plotter, you can use /P:N or /P:D.
  211.  
  212.       /B:???? = Baud rate (300/1200/2400) Default=2400
  213.  
  214.          Set the baud rate.  Use this if you decide to use a buad rate lower
  215.          than 2400 baud.  This might be necessary if you encounter a lot of
  216.          transmission errors on your serial connection.
  217.  
  218.       /T:???? = read Timeout in seconds   Default=120
  219.  
  220.          Set the number of seconds that the program is willing to wait for
  221.          buffer space to free up in the plotter.  You may need to increase
  222.          this beyond the default of 2 minutes (120 seconds) if you set the
  223.          pen speeds very low in AutoCAD (see ADI7221 for information on
  224.          configuring AutoCAD).
  225.  
  226.          Please note that lower baud rates do not necessitate longer timeout
  227.          settings.  The timeout only applies to the period of time between
  228.          sending packets.
  229.  
  230.    An example of a more complex invocation of the program might be:
  231.  
  232.       SEND7221 /C:2 /B:1200 /T:240 infile.hpp
  233.  
  234.    This would send infile.hpp out COM2, at 1200 baud, allowing 4 minutes
  235.    (240 seconds) for the buffer to clear between packets.
  236.  
  237.    Since the ADI7221 and SEND7221 programs will usually be run in sequence,
  238.    a batch file, PLOT7221, has been included in the distribution.  The
  239.    command line for this batch file consists of the following:
  240.  
  241.         PLOT7221 plotname
  242.  
  243.    The plotname parameter should not include a file extension.  PLOT7221
  244.    looks for a file named plotname.PLT, and attempts to convert it to a
  245.    file named plotname.HPP via the ADI7221 program.  If the ADI7221 program
  246.    completes successfully, SEND7221 is then called to send plotname.HPP to
  247.    the plotter.
  248.  
  249.    Command line options for the SEND7221 program can be included on the
  250.    PLOT7221 command line.  These options MUST follow the plotname
  251.    parameter.  The complete synopsis for the PLOT7221 batch command is as
  252.    follows:
  253.  
  254.         PLOT7221 plotname [SEND7221 options]
  255.  
  256. --------------------------ERROR AND WARNING MESSAGES-------------------------
  257.  
  258. Error: Invalid option: ???
  259.  
  260.   You specified a command line option that SEND7221 could not decode
  261.  
  262.   Retype the SEND7221 command.
  263.  
  264. Error: Invalid com port: ???
  265.  
  266.   The com port you specified with the /C option is not within the range of
  267.   1 - 4.
  268.  
  269.   Retype the SEND7221 command.
  270.  
  271. Error: Invalid baud: ???
  272.  
  273.   The baud rate you specified with the /B option was not one of 300, 1200,
  274.   or 2400.
  275.  
  276.   Retype the SEND7221 command.
  277.  
  278. Error: Invalid data bits: ???
  279.  
  280.   The number of data bits you specified with the /D option was not one of
  281.   7, 8, or D.
  282.  
  283.   Retype the SEND7221 command.
  284.  
  285. Error: Invalid stop bits: ???
  286.  
  287.   The number of stop bits you specified with the /S option was not one of
  288.   1 or 2.
  289.  
  290.   Retype the SEND7221 command.
  291.  
  292. Error: Invalid parity: ???
  293.  
  294.   The parity you specified with the /P option was not one of E, O, N, or D.
  295.  
  296.   Retype the SEND7221 command.
  297.  
  298. Error: Too many input files.
  299.  
  300.   You specified more than one input file to be processed by SEND7221.
  301.  
  302.   Retype the SEND7221 command.
  303.  
  304. Error: Input file not specified.
  305.  
  306.   You failed to include the name of the input file in the command line.
  307.  
  308.   Retype the SEND7221 command.
  309.  
  310. Error: can't allocate input buffer.
  311.  
  312.   There is not enough memory to run the program.  You either have a PC with
  313.   a very low amount of memory, or you have too many programs running in a
  314.   multitasking environment.
  315.  
  316.   If you are in a multitasking environment like Windows, try closing some
  317.   applications and rerunning the SEND7221 command.
  318.  
  319. Error: can't open input file for reading.
  320.  
  321.   SEND7221 could not find the input file, or there was an I/O error on the
  322.   disk.
  323.  
  324.   Check the spelling of the input file's name.  If it is correct, run the
  325.   MS-DOS CHKDSK command to see if there is a problem with the disk.
  326.  
  327. Error: I/O error reading input file.
  328.  
  329.   SEND7221 encountered an I/O error on the input file after it had been
  330.   opened successfully.  This probably indicates a problem with the disk.
  331.  
  332.   Run the MS-DOS CHKDSK program to determine if there is a problem with the
  333.   disk.
  334.  
  335. Error: I/O error closing input file.
  336.   
  337.   SEND7221 encountered an I/O error on the input file after it had been
  338.   opened and read successfully.  This probably indicates a problem with the 
  339.   disk.
  340.  
  341.   Run the MS-DOS CHKDSK program to determine if there is a problem with the
  342.   disk.
  343.  
  344.  
  345. Error: I/O error sending init string to plotter.
  346.  
  347.   This error indicates that the very first attempt to send information to
  348.   the plotter has failed.  It is likely that the plotter is turned off, or
  349.   is configured incorrectly.
  350.  
  351.   Make sure the plotter is turned on, and that it is on-line (the online
  352.   button is lit).
  353.  
  354.   Check the serial cable.  It should be a NULL modem cable, and should be
  355.   securely connected to COM1 (or the port you specified on the command line).
  356.   
  357.   Check to ensure that the baud rate and parity settings on the plotter are
  358.   the same as those used by SEND7221 (see the USAGE section for details).
  359.   
  360. Error: I/O error sending data to plotter.
  361.  
  362.   This error indicates that something has gone wrong with the second or
  363.   subsequent attempt to communicate with the plotter (ie the init string
  364.   seemed to go through correctly, but a later attempt to send data failed).
  365.  
  366.   Check the plotter to ensure that it has not been powered off or put in
  367.   local or standby modes.
  368.  
  369.   Check the serial cable to ensure that it is still connected securely.
  370.  
  371.   If the file you are sending was not created by ADI7221, it is possible that
  372.   it contains device control instructions that caused SEND7221 to fail.  You
  373.   will not be able to plot this file with SEND7221.
  374.  
  375.   If the plotter was able to receive some of the data (ie it started to
  376.   produce a plot), try increasing the timeout period (the /T option).  If
  377.   you set the pen speeds to one of the lower settings (or just left them at
  378.   the defaults that AutoCAD supplies) the buffer may not be clearing within
  379.   the 2 minute (120 second) timeout period.
  380.  
  381.   If the plotter did not begin to produce a plot, procede as if this were
  382.   the "I/O error sending init string" message.
  383.  
  384. Error: I/O error sending HP_END command to plotter.
  385.   
  386.   This error indicates that something has gone wrong with the connection 
  387.   after several successful communications.
  388.  
  389.   Check the plotter to ensure that it has not been powered off or put in
  390.   local or standby modes.
  391.  
  392.   Check the serial cable to ensure that it is still connected securely.
  393.  
  394.   If the file you are sending was not created by ADI7221, it is possible that
  395.   it contains device control instructions that caused SEND7221 to fail.  You
  396.   will not be able to plot this file with SEND7221.
  397.  
  398.   Increasing the timeout period will have no affect on this error.  The
  399.   timeout applies only to sending graphics commands; END_PLOT is a device 
  400.   control command.
  401.  
  402. -----------------------------PLOTTER ERROR LIGHTS----------------------------
  403.  
  404. Error light on solid:
  405.  
  406.   The plotter detected a parity error during transmission.
  407.   
  408.   Check to ensure that the parity enabled/disabled and even/odd settings on
  409.   the plotter match those used with the SEND7221 command.
  410.  
  411.   If the parity settings are correct, make sure the serial cable is connected
  412.   securely, that it is a NULL modem cable, and that the connector ends are
  413.   clean.
  414.  
  415.   If everything else seems ok, try lowering the baud rate.  A lower baud rate
  416.   may reduce the chance of an I/O error.
  417.  
  418. Error light blinking:
  419.  
  420.   The plotter detected an error in one of the 7221 command codes.
  421.  
  422.   If the file you are attempting to send was not created with the ADI7221
  423.   program, you will not be able to use SEND7221 to plot that file.
  424.  
  425.   You may have configured AutoCAD incorrectly.  Specifically, you may have
  426.   specified more speeds or more pens than your plotter supports.
  427.   Make sure you configured AutoCAD in accordance with the instructions in
  428.   the AutoCAD Setup section of ADI7221.DOC.
  429.  
  430.   Otherwise, check the cables, connectors, and command line switches as for
  431.   other types of plotter I/O errors.
  432.  
  433.   If everything seems to be correct, you may have encountered a bug in either
  434.   ADI7221 or SEND7221.
  435.  
  436. Out of Limit light on solid:
  437.  
  438.   The plotter has detected an attempt to move the pen beyond the plotting
  439.   boundaries.
  440.  
  441.   If you select EXTENTS or LIMITS when asked by AutoCAD for the part of the
  442.   drawing you wished to plot, those dimensions may be too large for the
  443.   plotter.  Make sure that you have not attempted to create a drawing that
  444.   was larger than 15.2 x 10.0 inches.
  445.  
  446.   You may also need to check the configuration options that were specified
  447.   in AutoCAD prior to producing the plot.  Make sure that you configured
  448.   AutoCAD in accordance with the instructions in the AutoCAD Setup section
  449.   of ADI7221.DOC.
  450.  
  451.   If everything seems to be ok, you may have encountered a bug in either
  452.   ADI7221 or SEND7221.
  453.  
  454. ------------------------------------BUGS-------------------------------------
  455.  
  456.    SEND7221 doesn't check the status of the plotter (ie are there any pens
  457.    in the pen bays) before sending data.  This is theoretically possible,
  458.    but I didn't put it in.  I might add it to a later version.
  459.  
  460.    It is possible to ask the plotter what type of error has caused the Error
  461.    light to begin flashing, but I haven't provided you with a way to do it.
  462.    You can do this by hand if you have a program that allows you to
  463.    communicate directly through the serial port.  Check the HP manual for
  464.    the device control command for reporting errors.
  465.  
  466.    Error and Warning messages should probably have been given numbers so
  467.    they would be easier to find in this manual.  There are only about 15
  468.    possible errors, so it shouldn't be too big of a deal.
  469.